#include "logger.h"

namespace Log4Qt
{

Logger::Logger(const QString &name)
{
    this->name = name;
}

void Logger::addAppender(const QSharedPointer<Appender> &appender)
{
    appenders.append(appender);
}

void Logger::info(const char *fileName, int fileLine, const QString &msg)
{
    for (auto appender : appenders)
    {
        appender->append(name, fileName, fileLine, "INFO", msg);
    }
}

}
